useFixture(default)

def test():
	from Modules import commonBits
	java_recorded_version = '1.6.0_17'

	if window('Protocol Buffer Editor'):
		select('FileChooser', commonBits.sampleDir() + 'protoFieldTest2.bin')
		click('Edit1')
		rightclick('Table1', 'Line,1')
		select_menu('Edit Record')
		assert_p('Table', 'Content', '[[f01, 1, , [10000, 10001], [10000, 10001]], [f02, 2, , [10000, 10001], [10000, 10001]], [f03, 3, , [10000, 10001], [10000, 10001]], [f04, 4, , [10000, 10001], [10000, 10001]], [f05, 5, , [10000, 10001], [10000, 10001]], [f06, 6, , [100000000, 100000001], [100000000, 100000001]], [f07, 7, , [100000000, 100000001], [100000000, 100000001]], [f08, 8, , [100000000, 100000001], [100000000, 100000001]], [f09, 9, , [100000000, 100000001], [100000000, 100000001]], [f10, 10, , [100000000, 100000001], [100000000, 100000001]], [f11, 11, , [10000.0, 10001.0], [10000.0, 10001.0]], [f12, 12, , [1.0E8, 1.00000001E8], [1.0E8, 1.00000001E8]], [f13, 13, , [false, false], [false, false]], [f15, 14, , [\'100000000\',\'100000001\'], [\'100000000\',\'100000001\']], [f17, 15, , [OTHER, SALE], [OTHER, SALE]], [f19, 16, , [0000000001, 0000000002], [0000000001, 0000000002]]]')
##		select('Table', '')
		select('Table', 'cell:Data,15([0000000001, 0000000002])')
		select('TextField1', '[0000000001, 00fe0034, 0000000002]')
		select('Table', 'cell:Field,13(f15)')
		select('Table', 'cell:Field,13(f15)')
		assert_p('Table', 'Content', '[[f01, 1, , [10000, 10001], [10000, 10001]], [f02, 2, , [10000, 10001], [10000, 10001]], [f03, 3, , [10000, 10001], [10000, 10001]], [f04, 4, , [10000, 10001], [10000, 10001]], [f05, 5, , [10000, 10001], [10000, 10001]], [f06, 6, , [100000000, 100000001], [100000000, 100000001]], [f07, 7, , [100000000, 100000001], [100000000, 100000001]], [f08, 8, , [100000000, 100000001], [100000000, 100000001]], [f09, 9, , [100000000, 100000001], [100000000, 100000001]], [f10, 10, , [100000000, 100000001], [100000000, 100000001]], [f11, 11, , [10000.0, 10001.0], [10000.0, 10001.0]], [f12, 12, , [1.0E8, 1.00000001E8], [1.0E8, 1.00000001E8]], [f13, 13, , [false, false], [false, false]], [f15, 14, , [\'100000000\',\'100000001\'], [\'100000000\',\'100000001\']], [f17, 15, , [OTHER, SALE], [OTHER, SALE]], [f19, 16, , [0000000001, 00fe0034, 0000000002], [0000000001, 00fe0034, 0000000002]]]')
		select('Table', 'cell:Field,13(f15)')
		select('Table', 'cell:Data,15([0000000001, 00fe0034, 0000000002])')
		click('ArrowButton')
		select('Table', 'cell:Data,1(00fe0034)')
		select('Table', '00fe0034ef', 'Data,1')
		select('Table', 'cell:Index,1(1)')
		assert_p('Table', 'Content', '[[0, 0000000001], [1, 00fe0034ef], [2, 0000000002]]')
		select('Table', 'cell:Data,1(00fe0034ef)')
		click('Add Row After')
		select('Table', '0099fe0ede', 'Data,2')
		select('Table', 'cell:Index,1(1)')
		assert_p('Table', 'Content', '[[0, 0000000001], [1, 00fe0034ef], [2, 0099fe0ede], [3, 0000000002]]')
		click('BasicInternalFrameTitlePane$NoFocusButton2')
		assert_p('Table', 'Text', '')
		assert_p('Table', 'Content', '[[f01, 1, , [10000, 10001], [10000, 10001]], [f02, 2, , [10000, 10001], [10000, 10001]], [f03, 3, , [10000, 10001], [10000, 10001]], [f04, 4, , [10000, 10001], [10000, 10001]], [f05, 5, , [10000, 10001], [10000, 10001]], [f06, 6, , [100000000, 100000001], [100000000, 100000001]], [f07, 7, , [100000000, 100000001], [100000000, 100000001]], [f08, 8, , [100000000, 100000001], [100000000, 100000001]], [f09, 9, , [100000000, 100000001], [100000000, 100000001]], [f10, 10, , [100000000, 100000001], [100000000, 100000001]], [f11, 11, , [10000.0, 10001.0], [10000.0, 10001.0]], [f12, 12, , [1.0E8, 1.00000001E8], [1.0E8, 1.00000001E8]], [f13, 13, , [false, false], [false, false]], [f15, 14, , [\'100000000\',\'100000001\'], [\'100000000\',\'100000001\']], [f17, 15, , [OTHER, SALE], [OTHER, SALE]], [f19, 16, , [0000000001, 00fe0034ef, 0099fe0ede, 0000000002], [0000000001, 00fe0034ef, 0099fe0ede, 0000000002]]]')
		click('BasicInternalFrameTitlePane$NoFocusButton2')

	close()
